package com.bingxue.edu.management.report.model.query;

import com.bingxue.edu.management.shop.model.entity.Order;
import com.mybatisflex.annotation.TableRef;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDate;

@Data
@TableRef(Order.class)
@Schema(description = "财务收支查询条件")
public class FinAccountStatQuery {

    @NotNull(message = "请输入查询开始日期")
    private LocalDate dateFrom;

    @NotNull(message = "请输入查询结束日期")
    private LocalDate dateTo;

    public LocalDate getDateTo() {
        return dateTo == null ? null : dateTo.plusDays(1);
    }

}
